package com.back.campus_back.service;

import com.back.campus_back.domain.Goods;
import com.back.campus_back.domain.ShoppingCart;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ${author}
 * @since 2021-04-20
 */
public interface ShoppingCartService extends IService<ShoppingCart> {

    //根据用户查询对应的购物车信息
    public List getShoppingCart(@Param(value = "user_id") int user_id);

    //查询购物车的某一条商品信息
    public List<Goods> getShoppingCartOne(@Param(value = "user_id") int user_id,@Param(value = "goods_id") int goods_id);

    //个人添加商品到购物车
    public Map<String,List> addShoppingCart(@Param(value = "user_id") int user_id, @Param(value = "goods_id") int goods_id);

    //删除购物车的商品
    public String deleteShoppingCart(@Param(value = "user_id") int user_id, @Param(value = "goods_id") int goods_id);


}
